home *** CD-ROM | disk | FTP | other *** search
- -- background: 2772 from stack: in
- -- bmap block id: 3308
- -- flags: 4000
- -- background id: 0
- -- name: Class Bkgnd
- ----- HyperTalk script -----
- on mouseup
- Put the id of the target into theid
- if the name of the target contains "bkgnd field" then
-
- if the short name of the target is not "Class Name" and the short name of the target is not "Class Number" then
- if field id theid is not empty then
- Put line 1 of field id theid into PickedName
- if the shiftkey is down then
- answer "Delete "&PickedName&" from this class?" with "Yes" or "Cancel"
- if it is "Yes" then
- Put "" into field id Theid
- else
- Exit to hypercard
- end if
- end if
-
- go to card PickedName of bkgnd "Student bkgnd"
- end if
- end if
- end if
- end mouseup
-
-
- on controlkey whichkey
-
- if whichkey is 19 then
- send mouseup to bkgnd button "Add Student"
- else if whichkey is 20 then
- send mouseup to bkgnd button "Add Test"
- else
- Pass controlkey
- end if
- end controlkey
-
- on GetGrades
- Put card field "11PupF" of first card into Levels
- Repeat with x=3 to number of fields
- if field x is not empty then
- Put word 1 of line 3 of field x into theaverage
- repeat with y=1 to number of lines in levels
- if theaverage<item 2 of line y of levels and theaverage>= item 3 of line y of levels then
- Put item 1 of line y of levels into HisGrade
- Put HisGrade into word 1 of line 4 of field x
- end if
- end repeat
- end if
- end repeat
- end getgrades
-
-
-
-
- on GetAverages
- Set NumberFormat to xx.0
- Repeat with x=3 to number of fields
- if field x is not empty then
- Put 0 into PrevEntry
- Put 0 into TestMissed
- Put 0 into z
- Put line 1 of field x into ThisName
- Put field "Grades" of card ThisName of bkgnd "Student bkgnd" into StuGrades
- Put field "Weights" of card ThisName of bkgnd "Student bkgnd" into StuWeights
- if stuweights is empty or stugrades is empty then exit if
- repeat with y=1 to number of items in StuWeights
- Put item y of StuGrades into grade
- Put item y of StuWeights into weight
- if y is the number of items in StuWeights then
- delete last char of grade
- delete last char of weight
- end if
- if grade is "*" then
- Put TestMissed+1 into TestMissed
- else
- Put grade*weight into ThisEntry
- Put ThisEntry+PrevEntry into PrevEntry
- Put z+weight into z
- end if
- end repeat
- Put PrevEntry/z into TheAverage
- Put TheAverage into word 1 of line 3 of field x
- Put TestMissed into word 1 of line 2 of field x
- end if
- end repeat
- GetGrades
- end getaverages
-
-
-
-
- on HereAreGrades
- Global ThePass,TheWeight
- Repeat with x= 1 to number of lines in ThePass
- Put item 1 of line x of thepass into TheName
- Put item 2 of line x of thepass into TheGrade
- Put TheGrade&"," after field "Grades" of card TheName of bkgnd "Student Bkgnd"
- Put TheWeight&"," after field "Weights" of card TheName of bkgnd "Student Bkgnd"
- end repeat
- GetAverages
- end HereAreGrades
-
-
-
-
-
-
-
-
-
- -- part 20 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=107 top=62 right=79 bottom=293
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 2
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: Class Name
-
-
- -- part 21 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=419 top=41 right=58 bottom=480
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 223
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: Class Number
-
-
- -- part 46 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=5 top=145 right=192 bottom=105
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 47 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=106 top=145 right=192 bottom=206
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 48 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=207 top=145 right=192 bottom=307
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 49 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=308 top=145 right=192 bottom=408
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 50 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=409 top=145 right=192 bottom=509
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 51 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=5 top=194 right=241 bottom=105
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 52 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=106 top=194 right=241 bottom=206
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 53 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=207 top=194 right=241 bottom=307
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 54 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=308 top=194 right=241 bottom=408
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 55 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=409 top=194 right=241 bottom=509
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 56 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=5 top=243 right=290 bottom=105
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 57 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=106 top=243 right=290 bottom=206
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 58 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=207 top=243 right=290 bottom=307
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 59 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=308 top=243 right=290 bottom=408
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 60 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=409 top=243 right=290 bottom=509
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 61 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=5 top=292 right=339 bottom=105
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 62 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=106 top=292 right=339 bottom=206
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 63 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=207 top=292 right=339 bottom=307
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 64 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=308 top=292 right=339 bottom=408
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 65 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=409 top=292 right=339 bottom=509
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 10
- -- style flags: 0
- -- line height: 11
- -- part name:
-
-
- -- part 66 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=10 top=103 right=119 bottom=101
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Add Student
- ----- HyperTalk script -----
- on mouseUp
- set cursor to 4
- Set lockscreen to true
- Push Card
- Ask "What is this students name"
- Put it into NewName
- if it is "" then exit to hypercard
- repeat with x=3 to the number of fields
- if field x is empty then
- Put NewName into line 1 of field x
- Put " 0 Missed Tests" into line 2 of field x
- Put " 0 Average" into line 3 of field x
- Put " 0 Grade" into line 4 of field x
- Put field "Class Name" into CName
- Go to bkgnd "Student Bkgnd"
- Type "N" with commandkey
- Put CName into field "Class Name"
- Set the name of this card to NewName
- Put NewName into field "Student Name"
-
- pop card
- Put field "Class Number"+1 into field "Class Number"
- Exit to Hypercard
- end if
- end repeat
- beep (1)
- answer "The Class is Full"
- end mouseUp
-
-
-
- -- part 67 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=9 top=123 right=139 bottom=101
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Add Test
- ----- HyperTalk script -----
- on mouseUp
- Set Cursor to 4
- repeat with x=3 to the number of fields
- Put line 1 of field x into thename
- if thename is not empty then
- Put thename&return after TheNames
- end if
- end repeat
- if thenames is empty then exit to hypercard
- Put field "Class Name" into CName
- Push Card
- ask "Name this test"
- if it is "" then exit to hypercard
- go to bkgnd "Tests"
-
- Type "N" with commandkey
- Put it into field "Test Name"
- Put CName into field "Class Name"
- Put TheNames into field "Scores"
- EnterTest
- end mouseUp
-
-
-
- -- part 68 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=470 top=107 right=130 bottom=498
- -- title width / last selected line: 0
- -- icon id / first selected line: 21700 / 21700
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Home
- ----- HyperTalk script -----
- on mouseUp
- visual effect dissolve slowly to black
- visual effect iris open slow to white
- visual effect dissolve
- go to home
- end mouseUp
-
-
-
- -- part 69 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=110 top=103 right=119 bottom=202
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Add Class
- ----- HyperTalk script -----
- on mouseUp
- Set Cursor to 4
- Set lockscreen to true
- ask "Name this Class"
- if it is "" then exit to hypercard
- Type "N" with commandkey
- Put it into field "Class Name"
- Put 0 into field "Class Number"
- end mouseUp
-
-
-
- -- part 71 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=231 top=109 right=132 bottom=261
- -- title width / last selected line: 0
- -- icon id / first selected line: 9301 / 9301
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
- ----- HyperTalk script -----
- on mouseUp
- visual effect venetian blinds
- go to previous card of this bkgnd
- end mouseUp
-
-
-
- -- part 72 (button)
- -- low flags: 00
- -- high flags: A003
- -- rect: left=399 top=112 right=127 bottom=458
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Tests
- ----- HyperTalk script -----
- on mouseUp
- Put field "Class Name" into holder
- go to bkgnd "Tests"
- find holder in field "Class Name"
- end mouseUp
-
-
-
- -- part 70 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=263 top=109 right=132 bottom=293
- -- title width / last selected line: 0
- -- icon id / first selected line: 27009 / 27009
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: New Button
- ----- HyperTalk script -----
- on mouseUp
- visual effect venetian blinds
- go to next card of this bkgnd
- end mouseUp
-
-